assert(TrackCooldowns, "TrackCooldowns not found!")
if (select(2, UnitClass("player"))) ~= "PRIEST" then return end

local guardian = GetSpellInfo(47788)
local mod = TrackCooldowns:NewModule("Priest", TrackCooldowns.ModuleBase, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0")
mod.cooldowns = TrackCooldowns.cooldowns["PRIEST"]

function mod:OnEnable()	
	self:QuickCheck("OnEnable")
	
	self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "PriestSpellSuccess")
end

function mod:PriestSpellSuccess(event, unit, spell)
	if unit ~= "player" then return end

	if spell == guardian then
		self:ScheduleTimer("GuardianScan", 12)
	end

	self:GenericSpellSuccess(event, unit, spell)
end

function mod:GuardianScan()
	self.canScanCooldowns = true
	self:ScanSpells()
end